<template>
  <div class="son">
    <h1>Son</h1>
    <h2>Money:{{ money }}</h2>
  </div>
</template>

<script setup>
import { ref } from "vue";

let money = ref(666);

//组件内部数据对外关闭的，别人不能访间
//如果想让外部访问需要通过defineExpose方法对外暴露
defineExpose({
  money,
});
</script>
<style scoped>
.son {
  width: 300px;
  height: 200px;
  background-color: cyan;
}
</style>
